<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    let student ={
        name:"张三",
        bj:"03班",
        xh:123456789
    };
    console.log(student.name);
    console.log(student.bj);
    console.log(student.xh);
    
    let studentArr = [
        {name:"王五",sg:120,nj:"6年级"},
        {name:"老六",sg:220,nj:"5年级"},
        {name:"王大",sg:180,nj:"10年级"}];
    for (let item of studentArr) {
        /*创建"p"标签*/
        let p = document.createElement("p")
        /*拿到信息*/
        p.innerText=item.name+":"+item.sg+":"+item.nj
        /*将p添加进去*/
        document.body.append(p);
    }
</script>

</body>
</html>